package org.example.library_management_system.Service.impl;

import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Select;
import org.example.library_management_system.Model.UserInfo;
import org.example.library_management_system.Service.UserService;
import org.example.library_management_system.mapper.IUserInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Slf4j
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private IUserInfoMapper iUserInfoMapper;

    public String selectByUserName(String userName){


        UserInfo userInfos = iUserInfoMapper.selectByUsername(userName);
        log.info("userInfos的值：{}",userInfos);

        if(userInfos==null){
            return null;
        }

        return userInfos.getPassword();
    }
}
